package com.xxzb.pack0819;



import java.io.*;
import java.util.Arrays;

//使用IO流实现：将D盘下的a.jpg复制到E盘中
public class TestB {
    public static void a() throws Exception{
        InputStream in=new FileInputStream("D:\\a.jpg");
        OutputStream out=new FileOutputStream("E:\\a.jpg");
//        byte[] bytes=new byte[1024];
//        String str="";
        int len;
        while ((len=in.read())!=-1){
            out.write(len);
        }

        out.close();
        in.close();
    }


    public static void main(String[] args) throws Exception{
a();
    }
}
